The present invention relates to a process and system for detecting a bend angle when bending a sheet-like workpiece to a desired angle.
One known bend angle detection system adapted for use in a bending machine such as press brakes is disclosed in Japanese Patent Publication Gazette (KOKAI) No. 7-239221 (1995). According to this publication, a slit light or a plurality of spot lights are projected onto a surface of a workpiece to form a light image thereon and the picture image of the light image is picked up by a pickup means to be subject to image processing, whereby the angle of a bend in the workpiece is detected.
In this bend angle detection system, a picture image picked up by the pickup means is digitized with an appropriate threshold to form a binary image, using a known image processing technique, the binary image is thinned to have one pixel width, and then the thinned straight line having one pixel width is represented by a sequence of points (x, y), treating one pixel as a unit. From this image composed of a sequence of points, a linear equation ax+by+c=0 is calculated, using the least squares method or the like. If the length of the straight line obtained from the calculation exceeds a specified value (e.g., one half the length of the screen), this straight line is determined as the points on the workpiece to be extracted. Then, the inclination and position of this straight line on the screen are calculated, from which the angle of a bend in the workpiece is determined.
The above publication also discloses a straight line extraction system for extracting only necessary straight lines formed on an image in cases where a workpiece has a plurality of bends. In this system, a slit light is projected onto the outer surface of a bent workpiece and this light also falls on a part of a lower die, so that the lower die is included within the view of the pickup means, and a picture image picked up by the pickup means under such a condition is represented as a sequence of points (x, y) as noted earlier. Then, a pattern composed of several straight lines is extracted from the sequential point image thus obtained and the second straight line which leads to a straight line resting on the lower end of the screen is taken out, whereby a desired straight line can be extracted.
Another prior art bend angle detection system is disclosed in Japanese Patent Publication Gazette (KOKOKU) No. 4-18926 (1992) according to which, a pickup device is positioned on a side of the dies and data on a picture image picked up in a state in which a workpiece (sheet material) has not been fed to a bending machine is stored in an A memory, while data on a picture image picked up in a state in which a workpiece has been fed to the bending machine is stored in a B memory. The picture image data are respectively converted into binary signals and these signals undergo a subtraction process, thereby obtaining image data on the workpiece based on which the angle of a bend in the workpiece is detected.
However, the bend angle detection system of Japanese Patent Publication No. 7-239221 reveals the following problem. Concretely, when detecting a bend angle of a workpiece having a short leg, two line segments, that is, the image of a light ray projected onto the workpiece and the image of a light ray projected onto the punch (upper die) are recognized. Since the image of the light ray projected onto the workpiece is shorter than a desirable specified length because of the short leg of the workpiece, the projected light image formed on the punch is mistakenly recognized as a line segment to be measured, which results in a failure in bend angle detection.
In the case of the above straight line extraction system which extracts necessary straight image lines only, if the lower die has a level difference, two line segments will be taken as the projected light image formed on the lower die, so that the projected light image on the lower die is mistakenly recognized as a line segment to be measured. If the workpiece is a wavy galvanized plate, a plurality of lines or one straight line is extracted as the projected light image formed on the workpiece so that the projected light image on the workpiece cannot be correctly picked up. If the boundary between the projected light image on the lower die and one on the workpiece is indefinite, it is difficult to extract the straight lines to be measured so that there occur troubles such as extraction of a pattern composed of only one straight line.
The bend angle detection system disclosed in Japanese Patent Publication No. 4-18926 which is a prior art system associated with the present invention is intended for pickup of the image of an actual bending position in a workpiece and designed to obtain image data on a side of a workpiece by subtraction of a background (such as dies) which is supplied with no workpiece. Therefore, the technical concept of this system is different from that of the present invention which is intended for accurate extraction of a projected light image formed on a workpiece.
The present invention is directed to overcoming the foregoing problems and the primary object of the invention is therefore to provide a bend angle detection system and bend angle detection process which are capable of accurately extracting a projected light image formed on a workpiece from various images even if the projected light image formed on the workpiece is short in length.
According to a first aspect of the invention, the above object can be achieved by a bend angle detection process in which a linear projected light image is produced on a surface of a workpiece, a picture image of the linear projected light image is picked up and subject to image processing, thereby detecting the angle of a bend in the workpiece,
the process comprising:
(a) a first step of picking up a picture image of a first linear projected light image during bending of the workpiece;
(b) a second step of picking up a picture image of a second linear projected light image after an elapse of a specified time period after picking up the picture image of the first linear projected light image;
(c) a third step of assigning the respective picture images picked up at the first step and at the second step to pixels arranged within a common plane represented by X and Y coordinates and dividing the pixels into two groups according to hue and brightness;
(d) a fourth step of creating a new picture image through logical operation which is performed by making comparison between each pixel associated with the picture image picked up at the first step and its corresponding pixel associated with the picture image picked up at the second step in the common plane represented by X and Y coordinates; and
(e) a fifth step of calculating the angle of the bend from the new picture image created in the fourth step.
In the process designed according to the first aspect of the invention, at the first step, a picture image of a first linear projected light image formed on a workpiece surface is picked up during bending operation. At the second step, a picture image of a second linear projected light image is picked up after an elapse of a specified time period after picking up the picture image of the first linear projected light image. Then, the picture images picked up at the first step and at the second step are respectively assigned to pixels arranged in a common plane represented by X and Y coordinates and these pixels are divided into two groups according to hue and brightness.
Thereafter, logical operation is performed by making a comparison between each pixel associated with the picture image picked up at the first step and its corresponding pixel associated with the picture image picked up at the second step within the common plane represented by X and Y coordinates. In this logical operation, the pixels associated with both of the picture images picked up at the first and second steps are eliminated from the pixels associated with the picture image picked up at the second step, so that a new picture image is created. More specifically, the logical operation is performed such that the first linear projected light image is compared to the second linear projected light image to create a new picture image which constitutes only an image which has moved (i.e., only the projected light image formed on the workpiece W). Based on the new picture image thus created, the angle of a bend in the workpiece is calculated.
According to the process of the invention, the image moving during bending of the workpiece, that is, the linear projected light image formed on the workpiece which is the object of measurement can be extracted alone. With this arrangement, even if the workpiece surface is not flat, the projected image formed on the workpiece surface can be accurately extracted, resulting in accurate detection of the angle of a bend in the workpiece.
Preferably, the picture image of the first linear projected light image is picked up prior to bending operation while the picture image of the second linear projected light image is picked up after completion of bending operation. With this arrangement, only the projected light image formed on the workpiece can be extracted after completion of bending operation, through pickup of two picture images and image processing, which allows, as a result, accurate detection of the angle of a bend in the workpiece.
In the process of the invention, it is preferable to repeatedly pick up the picture images of the first linear projected light image and the second linear projected light image at specified time intervals during bending operation and to create a new picture image each time the picture images of the first and second linear projected light images are picked up. Even if other objects than the workpiece move during bending operation, the moving speeds of the objects are slower than that of the workpiece so that they are considered not to have moved on the basis of the above time interval at which the picture images are picked up. Therefore, this arrangement enables it to extract, with higher accuracy, a pixel image corresponding to only the projected image formed on the workpiece W and to provide more accurate bend angle detection.
According to a second aspect of the invention, there is provided a bend angle detection system which implements the bend angle detection process according to the first aspect of the invention. This system is provided with light projector means for projecting a light ray to produce a linear projected light image on a surface of a workpiece, and pickup means for picking up a picture image of the linear projected light image produced on the workpiece surface,
the system further comprising:
(a) a first memory for storing a picture image of a first linear projected light image formed on the surface of the workpiece by the light projector means during bending operation, the picture image being picked up by the pickup means and;
(b) a second memory for storing a picture image of a second linear projected light image, the picture image being picked up after a specified time has elapsed after picking up the picture image of the first linear projected light image;
(c) a logical operation unit for respectively assigning the picture images of the first and second linear projected light images to pixels arranged in a common plane represented by X and Y coordinates, dividing these pixels into two groups according to hue and brightness, executing logical operation by making a comparison between each pixel associated with the first linear projected light image and its corresponding pixel associated with the second linear projected light image, these pixels having the same coordinates in the common plane;
(d) a third memory for storing a new picture image which has been created by the logical operation performed in the logical operation unit; and
(e) a bend angle computing unit for calculating the angle of a bend in the workpiece from the new picture image stored in the third memory.
In the bend angle detection system of the invention, a picture image of a first linear projected light image which has been produced on the surface of a workpiece during bending operation is picked up, and then, a picture image of a second linear projected light image is picked up after an elapse of a specified time period after picking up the picture image of the first linear projected light image. The picture images of the first and second linear projected light images are stored in the first memory and the second memory respectively.
Subsequently, the respective picture images of the first and second linear projected light images are input to a logical operation unit and assigned to pixels arranged in a common plane represented by X and Y coordinates. These pixels are then divided into two groups according to hue and brightness. Thereafter, each pixel of the picture image of the first linear projected light image is compared to its corresponding pixel of the picture image of the second linear projected light image to perform logical operation, these pixels having the same coordinate value. A new picture image is created by eliminating the pixels associated with the picture images of the first and second linear projected light images and the pixels associated with the picture image of the first linear projected light image. Specifically, a new picture image constitutes an image (i.e., only the projected light image formed on the workpiece) which moved during the pickup of the picture image of the second linear projected light image after picking up the picture image of the first linear projected light image. This new picture image is stored in a third memory, according which, the angle of a bend in the workpiece is calculated by the bend angle computing unit.
Similarly to the first aspect, the second aspect enables extraction of only the image which moves during bending operation, that is, the linear projected light image formed on the workpiece (i.e., the object to be measured). Further, even if the surface of the workpiece is not flat, the projected light image on the surface of the workpiece can be accurately extracted. As a result, accurate bend angle detection can be attained.
In the system of the invention, the picture image of the first linear projected light image may be picked up prior to bending operation while the picture image of the second linear projected light image may be picked up after completion of bending operation. The picture images of the first linear projected light image and the second linear projected light image may be repeatedly picked up at specified time intervals during bending operation and a new picture image may be created each time the picture images of the first and second linear projected light images are picked up.